package com.yige.common;

/**
 * Created by sunhao on 2015/9/9 0009.
 */
public class ResultUtil {


    //处理通用结果返回ajax回调函数
    public static String recallAjax(boolean flag){

        if(flag == true){
            return "success";
        }else{
            return "failed";
        }
    }

    //处理角色操作结果回调函数
    public  static  String recallAjaxForRole(boolean flag, String roleId){
        if(SystemConstant.ADMINISTRATTOR_ID.equals(roleId)){//操作超级管理员角色
            return "error";
        }else {
            if(flag == true){
                return "success";
            }else{
                return "failed";
            }
        }

    }



}
